package com.zoro.barn.business.service.login.conf;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author zhaoxingwu
 */
@Component
@ConfigurationProperties(prefix = "barn.token")
public class TokenConfigProperties {

    /**
     * 访问token的有效时间
     */
    private long exp = 1000 * 60 * 30;
    private String secret;
    /**
     * 刷新token 的有效时间
     */
    private long refreshExp = 1000 * 60 * 30 * 2;

    public long getRefreshExp() {
        return refreshExp;
    }

    public void setRefreshExp(long refreshExp) {
        this.refreshExp = refreshExp;
    }

    public long getExp() {
        return exp;
    }

    public void setExp(long exp) {
        this.exp = exp;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }
}
